interface IIndexType {
  [aaa: number]: any
  [bbb: string]: any
}

const nums: IIndexType = ["abc", "cba", "nba"]
// 通过数字类型访问索引,最终都转化成string类型
console.log(nums[0])

const info: IIndexType = { name: "why", age: 18 }
console.log(info["name"])
console.log(info["age"])
console.log(info.name)
console.log(info.age)

export { }